package com.neucollege.system.controller;

import com.neucollege.system.domain.dto.SupervisorDTO;
import com.neucollege.system.result.Result;
import com.neucollege.system.service.NEPSService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/neps")
@RequiredArgsConstructor
public class NEPSController {
    private final NEPSService nepsService;

    /**
     * 监督员注册接口
     * @param supervisorDTO 监督员数据传输对象
     * @return
     */
    @PostMapping("/register")
    public Result register(@RequestBody SupervisorDTO supervisorDTO){
        Result result = nepsService.register(supervisorDTO);
        log.info("用户{}注册",supervisorDTO);
        return result;
    }
}
